package 第1节循环语句;

public class AnLi14 {
    public static void main(String[] args) {
        int num = 2;
        for (int count = 0;count < 50;) {
            boolean flag = true;
            for (int i = 2; i < num; i++) {
                if (num % i == 0) {
                    flag = false;
                    break;
                }
            }
            if (flag) {
                System.out.print(num + "\t");
                count++;
                if (count % 10 == 0) {
                    System.out.println();
                }
            }
            num++;
        }
    }
}
